//
//  DHUserInfoHeaderView.m
//  精品酒店
//
//  Created by DIANGHONG on 2018/5/15.
//  Copyright © 2018年 DIANGHONG. All rights reserved.
//

#import "DHUserInfoHeaderView.h"
@interface DHUserInfoHeaderView()
@property (weak, nonatomic) IBOutlet UILabel *title;
@property (weak, nonatomic) IBOutlet UIButton *isAuthodButton;

@end
@implementation DHUserInfoHeaderView

+ (instancetype)headerViewWithTitle:(NSString *)title
                       isHaveAuthod:(BOOL)isHidden
                              state:(NSString *)state
{
    UINib *nib = [UINib nibWithNibName:@"DHUserInfoHeaderView" bundle:nil];
    DHUserInfoHeaderView *v = [nib instantiateWithOwner:nil options:nil][0];
    v.title.text = title;
    v.isAuthodButton.hidden = isHidden;
    
    if (!isHidden) {[v.isAuthodButton setTitle:state forState:UIControlStateNormal];}
    return v;
}

@end
